$(function() {
	$('#fb_button').live('click', function() {
		//alert(1);
		feedback.create();
	});
	
	
});


var feedback = (function(){
	var create = function() {
		var content = $("#feedback_content").val();
		if(content.length<1) {
			alert("请填写内容！");
			return true;
		} 
		$.ajax({
			type: "GET",
			url: _siteUrl+"/HrFeedback/create/",
			data: "content="+content,
			success: function(msg){
				if(msg == 0) {
					alert("发送成功！感谢您对我们工作的支持！");
					$(".ui-dialog").css("display","none");
				}
			}
		});
	}
	
	return {
		create   :  create
	};

})();

function str_to_time(str) {
	var new_str = str.replace(/:/g,'-');
	new_str = new_str.replace(/ /g,'-');
	var arr = new_str.split("-");
	var datum = new Date(Date.UTC(arr[0],arr[1]-1,arr[2],arr[3]-8,arr[4],arr[5]));
	return datum.getTime()/1000;
}